1. Field of the Invention
The present invention relates to a gateway apparatus that supports PPPoE (Point to Point Protocol over Ethernet(R)) and a method of controlling such an apparatus.
2. Description of the Related Art
Conventionally, a gateway apparatus is used so as to implement mutual communications between networks constructed in a corporation and external networks. For example, the gateway apparatus is used as a protocol converter for mutually connecting networks with different protocols. Examples of configuration of the gateway apparatus is one that supports only IPoE (Internet Protocol over Ethernet(R)) as a protocol for external networks, and one that supports both IPoE and PPPoE as protocols for external networks.
FIG. 1 illustrates a configuration of gateway apparatus 1100 that supports only IPoE. FIG. 2 is a diagram illustrating an example of network configuration to which gateway apparatus 1100 that supports only IPoE is connected.
As shown in FIG. 2, gateway apparatus 1100 is connected in its one interface to networks 1201 to 1204 that use IPoE as a protocol. Gateway apparatus 1100 communicates with gateways 1205 to 1208 disposed respectively on networks 1201 to 1204. Gateway apparatus 1100 is further connected in its other interface to terminals 1209 to 1211 such as personal computers (hereinafter referred to as “PC”) that use IPoE as a protocol.
In gateway apparatus 1100 shown in FIG. 1, frame transmitting/receiving sections 1101 and 1102 transmit/receive frames to/from Ethernet (R) I/F. IPoE frame assembling/deassembling sections 1103 and 1104 assemble and deassemble IPoE frames, while recognizing the IPoE frame structure.
Forwarding control section 1105 controls the output of IPoE frame based on a destination IP address included in the header information of an IP packet of an input IPoE frame. In controlling the output of IPoE frame, forwarding control section 1105 uses IPoE forwarding table 1106 and ARP (Address Resolution Protocol) table 1107.
As shown in FIG. 3, with IPoE forwarding table 1106 are registered network addresses, output interface numbers (output IF numbers), types of routing (direct/indirect routing) and destination IP addresses (next hop IP addresses) in indirect routing in relation to one another.
As shown in FIG. 4, with ARP table 1107 are registered destination IP addresses, source MAC addresses and destination MAC addresses in relation to one another. In addition, in source MAC address, since the MAC address of gateway apparatus 1100 is generally used, all the entries have the same value. Accordingly, it may be possible to provide the MAC address of gateway apparatus 1100 as a separate register, instead of providing areas for source MAC addresses in ARP table 1107.
The operation of gateway apparatus 1100 will be described below which has the aforementioned configuration and supports only IPoE. Herein, the case is explained where an IPoE frame is input to frame transmitting/receiving section 1101.
When an IPoE frame is input to frame transmitting/receiving section 1101, IPoE frame assembling/deassembling section 1103 recognizes a structure of the IPoE frame, and provides the recognized structure of the IPoE frame to forwarding control section 1105.
Forwarding control section 1105 compares a destination IP address included in the header information of an IP packet of the IPoE frame with a network address registered with IPoE forwarding table 1106.
When the table 1106 has the same network address as the destination IP address, the section 1105 acquires an output IF number and information of routing type (information indicative of whether the routing is direct routing or indirect routing) in relation to the network address in IPoE forwarding table 1106, and when the indirect routing is indicated, further acquires a destination IP address (next hop IP address). In addition, when the direct routing is indicated, the section 1105 acquires the destination IP address of the IP header of the IP packet.
Then, forwarding control section 1105 searches ARP table 1107 using the retrieved destination IP address to retrieve a source MAC address and destination MAC address of the IPoE frame. The retrieved source MAC address and destination MAC address are provided to IPoE frame assembling/deassembling section 1104.
Using the source MAC address and destination MAC address, IPoE frame assembling/deassembling section 1104 re-assembles the IPoE frame. There-assembled IPoE frame is provided to frame transmitting/receiving section 1102 and output from the section 1102. In this way, IPoE frames are forwarded in gateway apparatus 1100 that supports only IPoE.
FIG. 5 is a diagram illustrating a configuration of gateway apparatus 1500 that supports PPPoE. In addition, in FIG. 5 sections assigned the same reference numerals as in FIG. 1 have the same functions and descriptions thereof are omitted. FIG. 6 is a diagram illustrating an example of network configuration to which gateway apparatus 1500 that supports PPPoE is connected.
As shown in FIG. 6, gateway apparatus 1500 is connected in its one interface to network 1601 using IPoE as a protocol and networks 1602 to 1604 using PPPoE as a protocol. Gateway apparatus 1500 communicates with gateway 1605 disposed on network 1601 and PPPoE servers 1606 to 1608 disposed respectively on networks 1602 to 1604. Gateway apparatus 1500 is further connected in its other interface to terminals 1609 to 1611 such as personal computers that use IPoE as a protocol.
In gateway apparatus 1500 shown in FIG. 5, IPoE/PPPoE frame assembling/deassembling sections 1501 and 1502 assemble and deassemble IPoE frames and PPPoE frames, while recognizing the IPoE frame structure and PPPoE frame structure.
Forwarding control section 1503 controls the output of IPoE or PPPoE frame based on a source IP address or destination IP address included in the header information of an IP packet of an input IPoE frame, while controlling the output of PPPoE frame based on PPPoE header information of an input PPPoE frame. In controlling the output of IPoE or PPPoE frame, forwarding control section 1503 uses PPPoE forwarding table 1504 and PPPoE session table 1505 in addition to IPoE forwarding table 1106 and ARP table 1107.
As shown in FIG. 7, PPPoE forwarding table 1504 has source IP addresses, output IF numbers and retrieval indexes of PPPoE session (hereinafter referred to as “PPPoE session indexes”) in relation to one another.
As shown in FIG. 8, PPPoE session table 1505 has PPPoE session indexes, client MAC addresses, server MAC addresses and PPPoE session IDs in relation to one another.
The operation of gateway apparatus 1500 will be described below which has the aforementioned configuration and supports PPPoE. Herein, cases are explained separately where an IPoE frame is input to frame transmitting/receiving section 1101 and where a PPPoE frame is input to the section 1101.
When either frame is input to frame transmitting/receiving section 1101, IPoE/PPPoE frame assembling/deassembling section 1501 recognizes a structure of the frame, and provides the recognized structure of the frame to forwarding control section 1503.
When the input frame is an IPoE frame, forwarding control section 1503 compares a source IP address included in the header information of an IP packet of the IPoE frame with a source IP address registered with PPPoE forwarding table 1504.
When the table 1504 has the same source IP address as the source IP address included in the header information of the IP packet of the IPoE frame, the section 1503 acquires an output IF number and PPPoE session index in relation to the source IP address in PPPoE forwarding table 1504.
Then, forwarding control section 1503 searches PPPoE session table 1505 using the retrieved PPPoE session index, and acquires information such as a source MAC address, destination MAC address and PPPoE session ID to generate a PPPoE frame. The retrieved information to generate the PPPoE frame is provided to IPoE/PPPoE frame assembling/deassembling section 1502.
In addition, there is no direction information of source MAC address and destination MAC address in PPPoE session table 1505. The client MAC address is acquired as the source MAC address, and the server MAC address is acquired as the destination MAC address.
Based on the information to generate the PPPoE frame, IPoE/PPPoE frame assembling/deassembling section 1502 re-assembles the input IPoE frame to a PPPoE frame. The re-assembled PPPoE frame is provided to frame transmitting/receiving section 1102 and output from the section 1102.
When the same source IP address as that included in the header information of the IP packet of the IPoE frame is not registered with PPPoE forwarding table 1504, forwarding control section 1503 compares a destination IP address included in the header information of the IP packet with a network address registered with IPoE forwarding table 1106.
When the table 1106 has the same network address as the destination IP address, the section 1105 retrieves an output IF number and information of routing type (information indicative of whether the routing is direct routing or indirect routing) in relation to the network address in IPoE forwarding table 1106, and when the indirect routing is indicated, further retrieves a destination IP address (next hop IP address). In addition, when the direct routing is indicated, the section 1105 retrieves the destination IP address of the IP header of the IP packet.
Then, forwarding control section 1503 searches ARP table 1107 using the retrieved destination IP address to retrieve a source MAC address and destination MAC address of the IPoE frame. The retrieved source MAC address and destination MAC address are provided to IPoE/PPPoE frame assembling/deassembling section 1502.
Using the source MAC address and destination MAC address, IPoE/PPPoE frame assembling/deassembling section 1502 re-assembles the IPoE frame. The re-assembled IPoE frame is provided to frame transmitting/receiving section 1102 and output from the section 1102.
Meanwhile, when the input frame is a PPPoE frame, forwarding control section 1503 compares PPPoE header information of the PPPoE frame with an entry in PPPoE session table 1505.
When PPPoE header information of the PPPoE frame is matched with an entry registered with PPPoE session table 1505, the section 1503 compares a destination IP address included in the header information of an IP packet of the PPPoE frame with a network address registered with IPoE forwarding table 1106.
When the table 1106 has the same network address as the destination IP address, the section 1503 retrieves an output IF number and information of routing type (information indicative of whether the routing is direct routing or indirect routing) in relation to the network address, and when the indirect routing is indicated, further retrieves a destination IP address (next hop IP address). In addition, when the direct routing is indicated, the section 1503 retrieves the destination IP address of the IP header of the IP packet.
Then, forwarding control section 1503 searches ARP table 1107 using the retrieved destination IP address to retrieve a source MAC address and destination MAC address. The retrieved source MAC address and destination MAC address are provided to IPoE/PPPoE frame assembling/deassembling section 1502.
Using the source MAC address and destination MAC address, IPoE/PPPoE frame assembling/deassembling section 1502 re-assembles the PPPoE frame to an IPoE frame. The re-assembled IPoE frame is provided to frame transmitting/receiving section 1102 and output from the section 1102.
Thus, gateway apparatus 1500 that supports PPPoE relays an IPoE frame as an IPoE address according to a network address corresponding to a destination IP address included in the header information of an IP packet of the IPoE frame, while outputting as a PPPoE frame, selecting a PPPoE session corresponding to a source IP address included in the header information of the IP packet of the IPoE frame.
However, gateway apparatus 1100 that supports only IPoE has a problem that the apparatus 1100 cannot relay frames except IPoE frames. Further, gateway apparatus 1500 that supports PPPoE selects a PPPoE session corresponding to a source IP address included in the header information of an IP packet of an input IPoE frame. Accordingly, there arises a problem that since each terminal (1609 to 1611) cannot select a plurality of PPPoE sessions concurrently, it is not possible to access a plurality of PPPoE servers. Further, there is another problem that when source IP addresses are matched, since an IPoE frame is output automatically as a PPPoE frame, it is not possible to access a network that uses IPoE.